package com.wander.api.service;

import com.alibaba.dubbo.rpc.protocol.rest.support.ContentType;

import javax.validation.constraints.Min;
import javax.ws.rs.*;
import javax.ws.rs.core.MediaType;

/**
 * @author Wander.Zeng
 * @create 2018-02-11 17:26
 * @desc UserRestService
 */
@Path("demo")
@Produces({ContentType.APPLICATION_JSON_UTF_8})
@Consumes({MediaType.APPLICATION_JSON})
public interface UserRestService {

    /**
     * 登录方法
     *
     * @param loginName
     * @param password
     * @param id
     * @return
     */
    @GET
    @Path("/{loginName}/{password}/{id : \\d+}")
    String login(@PathParam("loginName") String loginName, @PathParam("password") String password, @PathParam("id") @Min(value = 1L, message = "User ID must be greater than 1") Long id);

}
